package com.ncmmall.domain.security.user;

import com.ncmmall.domain.security.role.Role;
import org.springframework.data.jpa.repository.JpaRepository;

/**
 * @author tongchun
 */
public interface WebUserRepository extends JpaRepository<WebUser, Long> {

    long countByUsernameAndRole(String username, Role role);

    long countByMobileAndRole(String mobile, Role role);

    WebUser findByUsernameAndRoleAndLiveType(String username, Role role, int liveType);
}
